package zhibi.cms.service;

import com.github.pagehelper.PageInfo;
import zhibi.cms.domain.Menu;
import zhibi.cms.extra.pojo.MenuPo;
import zhibi.commons.tree.Tree;
import zhibi.frame.domain.Page;
import zhibi.frame.mybatis.example.Example;
import zhibi.frame.service.BaseService;

import java.util.List;
import java.util.Map;

public interface MenuService extends BaseService<Menu> {

    /**
     * 通过条件查找
     *
     * @param example
     * @param page
     * @return
     */
    PageInfo<MenuPo> selectPoByExample(Example example, Page page);

    /**
     * 查看子菜单
     *
     * @param pid
     * @return
     */
    List<Menu> selectByPid(String pid);

    /**
     * 得到父级和下级
     * @param pid
     * @return
     */
    Map<String, Object> selectTreeByPid(String pid);
}
